/**
 * com.cnhis.cloudhealth.base.dao.SysParametersDao.java
 */
package com.cnhis.cloudhealth.clinical.medical.base.dao;

import com.cnhis.cloudhealth.clinical.infusion.base.mapper.SysParameters;
import com.cnhis.cloudhealth.clinical.medical.base.mapper.MParameter;
import com.cnhis.cloudhealth.commons.dao.BaseDao;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;


/**
 * @file  SysParametersDao.java
 * @author hedongdong
 * @version 0.1
 * @todo	SysParameters数据操作类
 * Copyright(C), 2013-2014
 *		  Shenzhen Coordinates Software Development Co., Ltd.
 * History
 *   	1. Date: 2016-06-13 02:22:13
 *      	Author: hedongdong
 *      	Modification: this file was created
 *   	2. ...
 */
@Repository
public class MsysParametersDao extends BaseDao {
	/**
	 * 查询出所有  参数信息
	 * @return
	 * @throws Exception
	 */
	public List<SysParameters> querySysParameter()throws Exception {
		List<SysParameters> list = new ArrayList<SysParameters>();
		list = getSqlSession().selectList("m_sys_parameters.querySysParameter",null);
		return list;
	}

	public void updateSysParameterList(List<MParameter> list) throws Exception{
		getSqlSession().update("m_sys_parameters.updateSysParameterList",list);
	}

	public List<SysParameters> findParameters(String[] params) throws Exception {
		List<SysParameters> list = new ArrayList<SysParameters>();
		list = getSqlSession().selectList("m_sys_parameters.findParameters", params);
		return list;
	}
}
